(*****************************************************************************
 * Delphi Plug-in Framework (DPF)
 * Copyright (C) 2006-2007 Tao Yuan
 *
 * The contents of this file are subject to the Mozilla Public License
 * Version 1.1 (the "License"); you may not use this file except in compliance
 * with the License. You may obtain a copy of the
 * License at http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
 * the specific language governing rights and limitations under the License.                                                               }
 *
 * The Initial Developer of the Original Code is Tao Yuan. Portions created by
 * Tao Yuan are Copyright (C) Tao Yuan (taoy.cn att gmail dott com)
 * All rights reserved.
 *****************************************************************************)
 
unit RDIdentityImpl;

interface

uses
  Rcl,
  RDIdentity, RDExceptions, RdClasses;

type
  TIdentityImpl = class(TRdLogPersistent, IIdentity)
  private
    FId: string;
  protected
    function getId: string; stdcall;
    function isEqualTo(idt: IIdentity): Boolean; virtual; abstract;
  public
    constructor Create(aId: string); overload;
  end;

implementation

constructor TIdentityImpl.Create(aId: string);
begin
  inherited Create;
  FId := aId;
  if FId = '' then
    raise EManifestProcessing.Create('BaPlugin.registry.Impl', 'manifestElementIdIsBlank');
end;

function TIdentityImpl.getId: string;
begin
  Result := FId;
end;


end.
